#include "io52223.h"

typedef char int8_t;
typedef unsigned char uint8_t;

enum Boleano{
  falsee,
  truee
}registerPositionValue = truee;

int8_t returnValue(uint8_t register1,int8_t position){
  int8_t temp = 0;
  switch(position){
  case 0: temp = (register1 & 0x01 ? truee: falsee);    break;
  case 1: temp = (register1 & 0x02 ? truee: falsee);    break;
  case 2: temp = (register1 & 0x04 ? truee: falsee);    break;
  case 3: temp = (register1 & 0x08 ? truee: falsee);    break;
  case 4: temp = (register1 & 0x10 ? truee: falsee);    break;
  case 5: temp = (register1 & 0x20 ? truee: falsee);    break;
  case 6: temp = (register1 & 0x40 ? truee: falsee);    break;
  case 7: temp = (register1 & 0x80 ? truee: falsee);    break;
  default:
     temp = 0x11;
  }
  return temp;
}

int main( void ){
  int8_t value = returnValue(0x11,4);
  return 0;
}
  